<template>
  <div class="met_banner">
    <swiper :show-dots="false" :loop="true" v-if="banner.length>0" ref="swiper" >
      <swiper-item v-for="item in banner" :key="item.id">
        <img :src="item.img_path" class="slide-image" ref="img" />
        <div class="text">
          <h4 class="title" :style="{color:item.img_title_color}">{{item.img_title}}</h4>
          <p class="subtitle" :style="{color:item.img_des_color}">{{item.img_des}}</p>
        </div>
      </swiper-item>
    </swiper>
    <div class="ny_banner" v-if="column.active.column_id!==10001 && banner.length===0">
      <h4 class="title">{{column.active.name}}</h4>
    </div>
  </div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
  computed: {
    ...mapGetters(['banner', 'column'])
  },
  mounted() {

  },
  data() {
    return {}
  }
}
</script>
<style lang="scss" scoped>
.met_banner {
  .slide-image {
    width: 100%;
  }
  .text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    .title {
      font-size: 18px;
      margin-bottom: 8px;
    }
    .subtitle {
      font-size: 14px;
    }
  }
  .ny_banner {
    height: 150px;
    background: #848484;
    text-align: center;
    color: #fff;
    line-height: 150px;
    font-size: 40px;
  }
}
</style>